<template>
  <uni-card title="身份卡" :sub-title="props.idName" :thumbnail="baseURL + props.identityIcon">
    <view class="qb"
      ><text class="iconfont">&#xe669;</text
      ><text class="balance">{{ memberStore.profile.balance }}￥</text></view
    >
  </uni-card>
</template>

<script lang="ts" setup>
import { onMounted } from 'vue'
import { onShow } from '@dcloudio/uni-app'
import { useMemberStore } from '../../../stores'
const memberStore = useMemberStore()
const props = defineProps<{ idName: string; identityIcon: string }>()
import { baseURL } from '@/utils/http'

onShow(() => {
  console.log('子组件获得')
  console.log(props.idName)
  console.log(memberStore.profile.balance)
  console.log(props.identityIcon)
})
</script>

<style lang="scss" scoped>
.qb {
  height: 40rpx;
}
.iconfont {
  color: #d81e06;
}
.balance {
  color: #d81e06;
  font-size: 30rpx;
  margin-left: 10rpx;
}
</style>
